package com.treasure.mall.biz.repository.wechat;

import com.treasure.mall.biz.base.JpaSearchableRepository;
import com.treasure.mall.biz.entity.wechat.WechatKeywordMessagePO;
import org.springframework.stereotype.Repository;

/**
 *
 * <p>
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.repository.wechat
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/9/15 11:04 上午
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * 
 */
@Repository
public interface WechatKeywordMessageRepository extends JpaSearchableRepository<WechatKeywordMessagePO, Long> {

    /**
     * @param keyword
     * @return
     */
    WechatKeywordMessagePO findFirstByKeywordLikeOrderByIdDesc(String keyword);

    /**
     * 根据关键字获取回复信息
     *
     * @param keyword 关键字
     * @return
     */
    WechatKeywordMessagePO findFirstByKeywordOrderByIdDesc(String keyword);
}
